package com.toolkit.module.calculation.controller;


import com.toolkit.common.CommonRespBean;
import com.toolkit.module.calculation.dto.CommercialLoanDto;
import com.toolkit.module.calculation.dto.PrepaymentLoanDto;
import com.toolkit.module.calculation.service.ILoanInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 贷款信息 前端控制器
 * </p>
 *
 * @author Maoco
 * @since 2025-06-10
 */
@RestController
@RequestMapping("/loanInfo")
public class LoanInfoController {
    @Autowired
    private ILoanInfoService iLoanInfoService;

    @GetMapping(value = "/getCommercialLoanDetail")
    public CommonRespBean getCommercialLoanDetail(CommercialLoanDto commercialLoanDto) {
        return CommonRespBean.success( iLoanInfoService.getCommercialLoanDetail(commercialLoanDto),"获取成功");
    }

    @GetMapping(value = "/getZhLoanDetail")
    public CommonRespBean getZhLoanDetail( CommercialLoanDto commercialLoanDto) {
        return CommonRespBean.success( iLoanInfoService.getZhLoanDetail(commercialLoanDto),"获取成功");
    }
    @GetMapping(value = "/getPrepaymentLoanDetail")
    public CommonRespBean getPrepaymentLoanDetail( PrepaymentLoanDto prepaymentLoanDto) {
        return CommonRespBean.success( iLoanInfoService.getPrepaymentLoanDetail(prepaymentLoanDto),"获取成功");
    }
}
